package com.kexin.jbsg.guansdk;

import android.app.Activity;
import android.content.Intent;

import com.kexin.jbsg.guansdk.callback.LoginCallBack;

/**
 * @author oven:
 * @version 创建时间：2013-3-13 下午2:32:11
 * 
 */
public class KomSDKInfo {
	public final static int RESULT_CODE_LOGIN=0;
	public static final int RESULT_CODE_REGISTER = 2;
	
	public final static int ACTION_CODE_REGISTER = 1;
	public static final int ACTION_CODE_LOGIN = 0;
	
	public static KomSDKInfo instance = null;
	
	public static int channel = 0;
	private LoginCallBack loginCallBack;
	
	public static void initSDK(int channel){
		instance = new KomSDKInfo();
		instance.setChannel(channel);
	}
	
	
	/**
	 * 打开登录界面
	 */
	public void openLoginActivity(Activity activity,LoginCallBack callback){
		Intent it = new Intent(activity,LoginActivity.class);
		activity.startActivityForResult(it, RESULT_CODE_LOGIN);
		setLoginCallBack(callback);
	}
	
	
	

	public static KomSDKInfo getInstance() {
		return instance;
	}

	public int getChannel() {
		return channel;
	}

	public LoginCallBack getLoginCallBack() {
		return loginCallBack;
	}

	public static void setInstance(KomSDKInfo instance) {
		KomSDKInfo.instance = instance;
	}

	public void setChannel(int channel) {
		this.channel = channel;
	}

	public void setLoginCallBack(LoginCallBack loginCallBack) {
		this.loginCallBack = loginCallBack;
	}
	
	
}

